import type { ExtensibleEntityDto, ExtensibleObject } from '@abp/ng.core';
import type { DocumentStatus } from '../core/document-status.enum';

export interface AuxiliaryUnitCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  unitId?: string;
  mainToAuxiliaryRatio: number;
  auxiliaryToMainRatio: number;
  mainArchiveId?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface AuxiliaryUnitDto extends ExtensibleEntityDto<string> {
  unitId?: string;
  mainToAuxiliaryRatio: number;
  auxiliaryToMainRatio: number;
  mainArchiveId?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
  mainArchive: UnitGroupMainArchiveDto;
  unit: UnitDto;
}

export interface BillOfMaterialsCreateDto extends BillOfMaterialsCreateOrUpdateBase {
}

export interface BillOfMaterialsCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  level: number;
  parentId?: string;
  displayName?: string;
  version?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface BillOfMaterialsDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  level: number;
  parentId?: string;
  displayName?: string;
  version?: string;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface BillOfMaterialsUpdateDto extends BillOfMaterialsCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface BomComponentCreateOrUpdateDto extends ExtensibleObject {
  id?: string;
  documentId?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface BomComponentDto extends ExtensibleEntityDto<string> {
  documentId?: string;
  document: BomMasterDocumentDto;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  lineNo: number;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface BomMasterCreateDto extends BomMasterCreateOrUpdateBase {
  children: BomComponentCreateOrUpdateDto[];
}

export interface BomMasterCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  version?: string;
  itemMasterId?: string;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface BomMasterDocumentDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  version?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface BomMasterDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  version?: string;
  itemMasterId?: string;
  itemMaster: ItemMasterDto;
  itemCode?: string;
  itemName?: string;
  itemSpec?: string;
  useCount: number;
  parentCount: number;
  unitId?: string;
  unit: AuxiliaryUnitDto;
  code?: string;
  businessDate?: string;
  documentStatus: DocumentStatus;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  children: BomComponentDto[];
  concurrencyStamp?: string;
}

export interface BomMasterUpdateDto extends BomMasterCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: BomComponentCreateOrUpdateDto[];
}

export interface ItemCategoryCreateDto extends ItemCategoryCreateOrUpdateBase {
}

export interface ItemCategoryCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  level: number;
  parentId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ItemCategoryDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  level: number;
  parentId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ItemCategoryUpdateDto extends ItemCategoryCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface ItemMasterCreateDto extends ItemMasterCreateOrUpdateBase {
}

export interface ItemMasterCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  itemCategoryId?: string;
  name?: string;
  spec?: string;
  unitGroupId?: string;
  canBePurchased: boolean;
  sellable: boolean;
  canBeProduced: boolean;
  canBeOutsourced: boolean;
  itemFormAttribute: number;
  enabled: boolean;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface ItemMasterDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  itemCategoryId?: string;
  category: ItemCategoryDto;
  name?: string;
  spec?: string;
  unitGroupId?: string;
  unitGroup: UnitGroupDto;
  canBePurchased: boolean;
  sellable: boolean;
  canBeProduced: boolean;
  canBeOutsourced: boolean;
  itemFormAttribute: number;
  enabled: boolean;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface ItemMasterUpdateDto extends ItemMasterCreateOrUpdateBase {
  concurrencyStamp?: string;
}

export interface UnitCreateDto extends UnitCreateOrUpdateBase {
}

export interface UnitCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface UnitDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  displayName?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
}

export interface UnitGroupCreateDto extends UnitGroupCreateOrUpdateBase {
  children: AuxiliaryUnitCreateOrUpdateDto[];
}

export interface UnitGroupCreateOrUpdateBase extends ExtensibleObject {
  tenantId?: string;
  groupName?: string;
  mainUnitId?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
}

export interface UnitGroupDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  groupName?: string;
  mainUnitId?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  concurrencyStamp?: string;
  mainUnit: UnitDto;
  children: AuxiliaryUnitDto[];
}

export interface UnitGroupMainArchiveDto extends ExtensibleEntityDto<string> {
  tenantId?: string;
  groupName?: string;
  mainUnitId?: string;
  code?: string;
  sourceType?: string;
  sourceKey?: string;
  sourceCreatedOn?: string;
  isDeleted: boolean;
  deleterId?: string;
  deletionTime?: string;
  lastModificationTime?: string;
  lastModifierId?: string;
  creationTime?: string;
  creatorId?: string;
  mainUnit: UnitDto;
}

export interface UnitGroupUpdateDto extends UnitGroupCreateOrUpdateBase {
  concurrencyStamp?: string;
  children: AuxiliaryUnitCreateOrUpdateDto[];
}

export interface UnitUpdateDto extends UnitCreateOrUpdateBase {
  concurrencyStamp?: string;
}
